export interface GetUserRoleListParams {
  orgCode?: string // 组织编码
  current?: number
  size?: number
  userId?: number | string
  search?: string
}

export interface AssignRoleRecord {
  roleId?: number
  roleCode?: string
  roleName?: string
  roleOrgCode?: number
  roleOrgName?: string
  subVisible?: number
  description?: string
  inheritedRoleOrgCode?: string
  inheritedRoleOrgName?: string
  inheritedRoleId?: number
  inheritedRoleName?: string
  remark?: string
  createTime?: string
  createBy?: number
  createName?: string
  updateTime?: string
  updateBy?: number
  updateName?: string
}

export interface AssignRolePageData {
  current?: number
  size?: number
  total?: number
  records?: AssignRoleRecord[]
}

export interface AssignRoleResponse {
  code?: number
  message?: string
  data?: AssignRolePageData
}

export interface GetRoleListParams {
  orgCode: string | undefined // 组织编码
  current: number
  size: number
  scope?: string
  search?: string
  userId?: number | string
}

export interface AddRoleParams {
  userId: number
  roles: UserRoleItem[]
}

export interface DeleteRoleParams {
  ids: string[]
}

export interface UserRoleItem {
  roleId: number
  roleCode: string
  roleOrgCode: string
}

/**
 * 用户
 */
export interface UserBO {
  userId: string
  userName: string
  gender: string
  mobilePhone: string
  email: string
  status: number
  createBy: string
  createTime: string
  updateBy: string
  updateTime: string
  orgCode: string
  orgFullName: string
  orgShortName: string
  fullNamePath: string
  orgList?: OrgBo[]
  [key: string]: any
}

/**
 * 组织
 */
export interface OrgBo {
  code: string
  label: string
  extraInfo: string
  isExtend: string
  isLeaf: string
  is_default_org: string
  org_type: string
  parentCode: string
  status: string
  createBy: string
  createTime: string
  updateBy: string
  updateTime: string
}
